//flag
//go run main.go --help
//go doc flag

package main

import (
	"flag"
	. "fmt"
	"os"
)

func init() {
	flag.CommandLine = flag.NewFlagSet("", flag.ExitOnError)
	flag.CommandLine.Usage = func() {
		Fprintf(os.Stderr, "Usage of %s:\n", "question")
		flag.PrintDefaults()
	}
}

var name string

func main() {
	flag.StringVar(&name, "name", "everyone", "The greeting object.")
	flag.Parse()
	Println("Hi  ", name)
	blockTest()
	containerTest()
}

func blockTest() {
	block := "function"
	{
		block := "inner"
		Printf("The block is %s\n", block)
	}
	Printf("The block is %s\n", block)
}

var container = []string{"zero", "one", "two"}

func containerTest() {
	container := map[int]string{0: "0", 1: "1", 2: "2"}
	Printf("The element is %q.\n", container[1])
}
